package com.example.controller;

import com.example.service.DataInterfaceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 与三方单位进行数据对接的接口
 */
@RestController
@RequestMapping("api/elevator")
public class DataInterfaceController {

    @Autowired
    DataInterfaceService dataInterfaceServices;


    //查询维保单位
    @ApiOperation(value = "查询维保单位", notes = "查询维保单位")
    @RequestMapping(value = "/listMaintenancePartyInterface", method = RequestMethod.GET)
    private Map<String, Object> listMaintenancePartyInterface(@RequestBody Map map) {
        return dataInterfaceServices.listMaintenancePartyInterface(map);
    }

    // 查询维保记录
    @ApiOperation(value = "查询维保记录", notes = "查询维保记录")
    @RequestMapping(value = "/listMaintenanceRecordsInterface", method = RequestMethod.GET)
    private Map<String, Object> listMaintenanceRecordsInterface(@RequestBody Map map) {
        return dataInterfaceServices.listMaintenanceRecordsInterface(map);
    }

    // 查询维保项目
    @ApiOperation(value = "查询维保项目", notes = "查询维保项目")
    @RequestMapping(value = "/listMaintenanceProjectInterface", method = RequestMethod.GET)
    private Map<String, Object> listMaintenanceProjectInterface(@RequestBody Map map) {
        return dataInterfaceServices.listMaintenanceProjectInterface(map);
    }


}
